<template>
  <div :style="setStyle" v-if="this.comIsTable" v-html="formatTable()"></div>
  <div v-else v-html="format()"></div>
</template>

<script>
import { generalHyperLinksFormat } from '@/utils/common'
import mixinTableFormat from './table-format'
export default {
  mixins: [mixinTableFormat],
  props: {
    gadgetType: {
      type: String,
      default: ''
    }
  },
  data () {
    return {}
  },
  methods: {
    format () {
      return generalHyperLinksFormat(this.$data.data[this.$data.data.column.field], this.$data.data.column.fieldsFormat, 'gridgadget', this.$data.data.column.isNewPage, this.$data.data, this.$data.data.column.fieldsList)
    },
    formatTable () {
      return generalHyperLinksFormat(this.curData, this.column.fieldsFormat, 'gridgadget', this.column.isNewPage, this.curRow, this.column.fieldsList)
    }
  }
}
</script>
